package com.gzj.environment.enums.code.impl.systemCode;

import com.gzj.environment.enums.code.BaseCode;
import lombok.AllArgsConstructor;

/**
 * @description:
 * @author: tsing
 * @create: 2020-08-09 15:02
 */
@AllArgsConstructor
public enum ResourceCode implements BaseCode {
    // 4.3.资源相关(4201~4299)
    DO_NOT_HAVE_THIS_PERMISSION(false, 4201, "您没有权限进行此项操作"),
    EXISTS_RESOURCE_NAME(false, 4108, "资源名称已存在"),
    EXISTS_CHILD(false, 4109, "存在子资源")
    ;

    private Boolean success; // 是否成功
    private int code; // 状态码
    private String message; // 操作信息

    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
